﻿using System;
using System.Collections.Generic;
using System.Data.Objects.DataClasses;
using System.Linq;
using System.Text;
using ApprovalUtilities.Persistence;
using Entities;

namespace EntityFramework
{
    public class EntityFrameworkSaver<T> : ISaver<T> 
    {
        private readonly EntityFrameworkDemoEntities _db;

        public EntityFrameworkSaver(EntityFrameworkDemoEntities db)
        {
            _db = db;
        }

        public T Save(T t)
        {
            _db.SaveChanges();
            return t;
        }
    }
}
